<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bluetooth Host Stack Library: GATT Database</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Bluetooth Host Stack Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__gattdb__api__functions.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">GATT Database<div class="ingroups"><a class="el" href="group__wicedbt__gatt.html">Generic Attribute (GATT)</a> &raquo; <a class="el" href="group__gatt__server__api__functions.html">Server API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>GATT Database Access Functions. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga29fd2f86442a2fdadf9c4a05094e5c7f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__wicedbt__gatt.html#ga0e035835afe92d61fe430ea19029677a">wiced_bt_gatt_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gattdb__api__functions.html#ga29fd2f86442a2fdadf9c4a05094e5c7f">wiced_bt_gatt_db_init</a> (const uint8_t *p_gatt_db, uint16_t gatt_db_size, <a class="el" href="group__bt__types.html#ga6b2f6680ad9b818353df2c23bcd96546">wiced_bt_db_hash_t</a> hash)</td></tr>
<tr class="memdesc:ga29fd2f86442a2fdadf9c4a05094e5c7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the GATT database (Please refer <a class="el" href="group__wicedbt__gatt.html#GATT_DB_MACROS">Service and Characteristic macros</a> for MACRO's to create or add entries to GATT database)  <a href="#ga29fd2f86442a2fdadf9c4a05094e5c7f">More...</a><br /></td></tr>
<tr class="separator:ga29fd2f86442a2fdadf9c4a05094e5c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga677cb480a1affb01d8f2c7f4c35dff2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__wicedbt__gatt.html#ga0e035835afe92d61fe430ea19029677a">wiced_bt_gatt_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gattdb__api__functions.html#ga677cb480a1affb01d8f2c7f4c35dff2e">wiced_bt_gatt_add_services_to_db</a> (const uint8_t *p_gatt_db, uint16_t gatt_db_size, <a class="el" href="group__bt__types.html#ga6b2f6680ad9b818353df2c23bcd96546">wiced_bt_db_hash_t</a> hash)</td></tr>
<tr class="memdesc:ga677cb480a1affb01d8f2c7f4c35dff2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a service module to the database.  <a href="#ga677cb480a1affb01d8f2c7f4c35dff2e">More...</a><br /></td></tr>
<tr class="separator:ga677cb480a1affb01d8f2c7f4c35dff2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6183e7711927516a6dc3dcaee3d85241"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__wicedbt__gatt.html#ga0e035835afe92d61fe430ea19029677a">wiced_bt_gatt_status_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gattdb__api__functions.html#ga6183e7711927516a6dc3dcaee3d85241">wiced_bt_gatt_db_remove_services_from_db</a> (const uint8_t *p_gatt_db, <a class="el" href="group__bt__types.html#ga6b2f6680ad9b818353df2c23bcd96546">wiced_bt_db_hash_t</a> hash)</td></tr>
<tr class="memdesc:ga6183e7711927516a6dc3dcaee3d85241"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the service module from the database.  <a href="#ga6183e7711927516a6dc3dcaee3d85241">More...</a><br /></td></tr>
<tr class="separator:ga6183e7711927516a6dc3dcaee3d85241"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga29fd2f86442a2fdadf9c4a05094e5c7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29fd2f86442a2fdadf9c4a05094e5c7f">&#9670;&nbsp;</a></span>wiced_bt_gatt_db_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__wicedbt__gatt.html#ga0e035835afe92d61fe430ea19029677a">wiced_bt_gatt_status_t</a> wiced_bt_gatt_db_init </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>p_gatt_db</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>gatt_db_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__bt__types.html#ga6b2f6680ad9b818353df2c23bcd96546">wiced_bt_db_hash_t</a>&#160;</td>
          <td class="paramname"><em>hash</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the GATT database (Please refer <a class="el" href="group__wicedbt__gatt.html#GATT_DB_MACROS">Service and Characteristic macros</a> for MACRO's to create or add entries to GATT database) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_gatt_db</td><td>: First element in new GATT database array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gatt_db_size</td><td>: Size (in bytes) of GATT database </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hash</td><td>: The calculated database hash value. The hash pointer passed to this function shall be NULL incase the application does not support dynamic databases and does not support database caching</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>GATT server apps which support Robust Caching need to invoke </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__gatt__module__init.html#ga8ccd2cb4b9fb6764bb59768e9d258efd" title="Enables GATT database hashing calculations on the server.">wiced_bt_gatt_server_enable_caching</a> prior to invoking <a class="el" href="group__gattdb__api__functions.html#ga29fd2f86442a2fdadf9c4a05094e5c7f" title="Initialize the GATT database (Please refer Service and Characteristic macros for MACRO&#39;s to create or...">wiced_bt_gatt_db_init</a> </dd></dl>
<dl class="section note"><dt>Note</dt><dd>In case </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__gatt__module__init.html#ga8ccd2cb4b9fb6764bb59768e9d258efd" title="Enables GATT database hashing calculations on the server.">wiced_bt_gatt_server_enable_caching</a> is not invoked, <code>hash</code> has to be set to NULL</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__wicedbt__gatt.html#ga972f2437538363989cee28019cb06652">wiced_bt_gatt_status_t </a> </dd></dl>

</div>
</div>
<a id="ga677cb480a1affb01d8f2c7f4c35dff2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga677cb480a1affb01d8f2c7f4c35dff2e">&#9670;&nbsp;</a></span>wiced_bt_gatt_add_services_to_db()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__wicedbt__gatt.html#ga0e035835afe92d61fe430ea19029677a">wiced_bt_gatt_status_t</a> wiced_bt_gatt_add_services_to_db </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>p_gatt_db</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>gatt_db_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__bt__types.html#ga6b2f6680ad9b818353df2c23bcd96546">wiced_bt_db_hash_t</a>&#160;</td>
          <td class="paramname"><em>hash</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a service module to the database. </p>
<p>Service modules define the complete service handles (i.e Service, characteristics, descriptor, included service declaration handles) The handle range in the service modules have to be distinct, i.e, cannot overlap with any of the existing service modules in the database </p><dl class="section note"><dt>Note</dt><dd>Set the <a class="el" href="structwiced__bt__cfg__gatt__t.html#a21cfdfa5210bb9e6b976752169c69571">wiced_bt_cfg_gatt_t::max_db_service_modules</a> to the number of additional services to be added</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_gatt_db</td><td>: First element in GATT database array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">gatt_db_size</td><td>: Size (in bytes) of GATT database </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hash</td><td>: The calculated database hash value. The hash pointer passed to this function can be NULL incase the application does not support dynamic databases and does not support database caching</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__wicedbt__gatt.html#ga972f2437538363989cee28019cb06652">wiced_bt_gatt_status_t </a> </dd></dl>

</div>
</div>
<a id="ga6183e7711927516a6dc3dcaee3d85241"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6183e7711927516a6dc3dcaee3d85241">&#9670;&nbsp;</a></span>wiced_bt_gatt_db_remove_services_from_db()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__wicedbt__gatt.html#ga0e035835afe92d61fe430ea19029677a">wiced_bt_gatt_status_t</a> wiced_bt_gatt_db_remove_services_from_db </td>
          <td>(</td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>p_gatt_db</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__bt__types.html#ga6b2f6680ad9b818353df2c23bcd96546">wiced_bt_db_hash_t</a>&#160;</td>
          <td class="paramname"><em>hash</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove the service module from the database. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_gatt_db</td><td>: First element in GATT database array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">hash</td><td>: The calculated database hash value. The hash pointer passed to this function can be NULL incase the application does not support dynamic databases and does not support database caching</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__wicedbt__gatt.html#ga972f2437538363989cee28019cb06652">wiced_bt_gatt_status_t </a> </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Bluetooth Host Stack Library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
</body>
</html>
